<?php
/**
 * @author 	 	 faithsmine@gmail.com 
 * @copyright		 www
 * @version		 1.0
 * @name 		 view.action.php
 * @todo 		 查看信息程序处理
 * @final 		 2009-12-10
 */
!defined("IN_YCTOOL") && exit();
$user->isLogin($userpathpre);
$operation      = isset($_GET['operation']) ? $_GET['operation'] : "";
$id		= isset($_GET['id']) ? $_GET['id'] : $_POST['id'];
$type		= isset($_GET['type']) ? $_GET['type'] : $_POST['type']; 
$whereY = 1;

switch ($operation)
{

case 'news':
    $idkeyU = 'nid';
    $tableU = DB_TABLEPRE . 'news';
    break; 
case 'products':
    $tableU = DB_TABLEPRE . 'products';
    $idkeyU = 'pid';
    $pcls_arrs = db::getAll(DB_TABLEPRE . 'products_cls', '*', 'ctype=1 AND cset = 1 AND paid = 0'); 
    foreach($pcls_arrs as $val)
    {
        $pcls_arrs2[$val['clsid']] = $val['clsname']; 
    }
    break;  
case 'user':
    $tableU = DB_TABLEPRE . 'user_basic';
    $idkeyU = 'userid';
    break;  
default:;
}

$whereY .= " AND $idkeyU = '$id' ";

//操作查询
if ($operation)
{
    $rs = db::getRow( $tableU, "*", $whereY);
}
//foreach($arr_acttype as $k => $v)
{
//	$sss = $v['orgid'];
//	$ta[$sss] = $v['orgname'];	 
}

?>
